package com.example.activitylifecycle;
import org.osgi.framework.BundleException;
import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends Activity {

	@Override
	protected void onResume() {
		super.onResume();
		TextView log=(TextView) this.findViewById(R.id.log);
		log.setText(ActivityLog.getLog().toString());
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		TextView log=(TextView) this.findViewById(R.id.log);
		log.setText(ActivityLog.getLog().toString());
		Button button1=(Button) this.findViewById(R.id.button1);
		button1.setOnClickListener(
				new OnClickListener(){
					@Override
					public void onClick(View arg0) {
						TextView i=null;
						i.setText("");
					}
		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}
}
